/* @(#)ProductType.java    V1.0
 *
 * Project: APEP 
 *
 * Modify Information:
 * =============================================================================
 *   Author       Date       Description
 *   ------------ ---------- ---------------------------------------------------
 *       {CREATE_TIME} First release
 *
 * Copyright Notice:
 * =============================================================================
 *    Copyright (c) 2001-2007 Auto-Parts E-Procurement Co., Ltd. 
 *        No.251-1 Wuning Road, Shanghai, 200063, China All rights reserved.
 *
 *    This software is the confidential and proprietary information of
 *        Auto-Parts E-Procurement Co., Ltd. ("Confidential Information").
 *        You shall not disclose such Confidential Information and shall use it
 *        only in accordance with the terms of the license agreement you entered
 *        into with APEP.
 *
 * Warning:
 * =============================================================================
 *   
 * 
 */

package system.base;

import system.SelectManager;
import system.data.ProductUpdatePriceBase;
import framework.core.*;

/*
	Author    :
	CreateTime:{CREATE_TIME}
*/
public class ProductUpdatePrice extends ProductUpdatePriceBase 
{

//----system generated start----// 	
	private static final String SEQ_NAME = "S_PRODUCT_UPDATE_PRICE";
public ProductUpdatePrice() 
{
	
}

private static void delete(DBConnection con,String id) throws Exception
{
	Conditions conditions = new Conditions();

	conditions.add(ID,id);
	
	delete(con,TABLE_NAME,conditions);
}

public String viewStatus(DBConnection con) throws Exception
{
    return SelectManager.viewYesOrNo(getStatus());
}

public static ProductUpdatePrice fetch()
{
	return new ProductUpdatePrice();
}
public static ProductUpdatePrice copy(ProductUpdatePrice srcObj)
{
	ProductUpdatePrice obj = fetch();
	obj.copyBase(srcObj);
	return obj;
}

public static ProductUpdatePrice fetch(DBConnection con,String id) throws Exception
{
	Conditions conditions = new Conditions();

	conditions.add(ID,id);
	
	return fetch(con,conditions);
}

public static ProductUpdatePrice fetch(DBConnection con,Conditions conditions) throws Exception
{
	DBResult result = null;
	try
	{
		result = DBEngine.doSelect(con,"select * from " + TABLE_NAME,conditions);
		java.sql.ResultSet rs = result.getRs();
		ProductUpdatePrice obj = null;
		if(rs.next())
		{
			obj = fetch(rs);
		}
		return obj;
	}
	finally
	{
		if(result!=null) result.clear() ;
	}
}
public static ProductUpdatePrice fetch(java.sql.ResultSet rs) throws Exception
{
	ProductUpdatePrice obj = new ProductUpdatePrice();
	obj.initObject(rs);
	return obj;
}
protected void getUnique(DBConnection con) throws Exception
{
		setId(DBEngine.getId(con));
}
//----system generated end----//

}

